//
//  StickerCell.m
//  BaiTengIM
//
//  Created by awh on 2019/9/16.
//  Copyright © 2019 awh. All rights reserved.
//

#import "StickerCell.h"

#import "StickerModel.h"

@interface StickerCell ()

@property(nonatomic, strong) UIImageView *iconView;

@end

@implementation StickerCell

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        [self setupSubviews];
    }
    return self;
}

- (void)setupSubviews {
    self.iconView = [[UIImageView alloc]init];
    self.iconView.contentMode = UIViewContentModeCenter;
    [self.contentView addSubview:self.iconView];
    [self.iconView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.contentView);
    }];
}

- (void)setSticker:(StickerModel *)sticker {
    _sticker = sticker;
    self.iconView.image = [UIImage imageNamed:sticker.image];
}


@end
